
#include <BAudio>
#include <BPointArray>
#include <BWidget>

using namespace BWE;

class WaveViewer : public BWidget
{
public:
	WaveViewer(BWidget* parent = 0);
	~WaveViewer();

	void setWave(const BAudio* audio);
	const BAudio* audio() const;

protected:
	virtual void freshEvent(const BEvent& event) override;
	virtual void paintEvent(const BEvent& event) override;

private:
	BHolder<BAudio>	_audio;
	bool			_dirty;
	BPointArray		_points;

};